// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { WinBase } from "../wins/WinBase";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends WinBase {

    

    start () {
        if(this._args.msg) {
            this.nodes.tips.getComponent(cc.Label).string = this._args.msg;
        }
        //创建旋转动画
        cc.tween(this.nodes.icon)
            .by(1, { angle: -360})
            .repeatForever()
            .start()
        if(this._args.cb) {
            this._args.cb();
        }
        this.scheduleOnce(() => {
            this._close();
        },2)

    }
}
